import * as orders from './data/orders';
import { defineFakeRoute } from 'vite-plugin-fake-server/client';

export default defineFakeRoute([
  {
    url: '/erp/api/v1/materialCategory/getcategoryType',
    method: 'get',
    response: () => {
      return orders.categoryType;
    }
  },
  // /erp/api/v1/material/getCategory
  {
    url: '/erp/api/v1/material/getCategory',
    method: 'get',
    response: () => {
      return orders.category;
    }
  },
  // /amazon/api/v1/amzauthority/getAmazonGroup
  {
    url: '/amazon/api/v1/amzauthority/getAmazonGroup',
    method: 'get',
    response: () => {
      return orders.amazonGroup;
    }
  },
  // /erp/api/v1/warehouse/getlist?ftype=self_usable
  {
    url: '/erp/api/v1/warehouse/getlist',
    method: 'get',
    response: () => {
      return orders.warehousesList;
    }
  },
  // /erp/api/v1/customer/listAll
  {
    url: '/erp/api/v1/customer/listAll',
    method: 'get',
    response: () => {
      return orders.customers;
    }
  },
  // /erp/api/v1/warehouse/getNamelist?ftype=self_usable
  {
    url: '/erp/api/v1/warehouse/getNamelist',
    method: 'get',
    response: () => {
      return orders.warehouses;
    }
  },
  // erp/api/v1/purchase_form/getPurchaseNumAllStatus?ftype=orders
  {
    url: '/erp/api/v1/purchase_form/getPurchaseNumAllStatus',
    method: 'get',
    response: () => {
      return orders.purchaseNumAllStatus;
    }
  },
  // erp/api/v1/purchase_form/getListByOrder
  {
    url: '/erp/api/v1/purchase_form/getListByOrder',
    method: 'post',
    response: () => {
      return orders.listByOrder;
    }
  }
]);
